NAnt
Help
Task Reference
<zip> |
v0.85 |
[This is preliminary documentation and subject to change.]
Creates a zip file from a specified fileset.
Uses #ziplib (SharpZipLib), an open source Zip/GZip library written entirely in C#.
| Attribute | Type | Description | Required |
|---|---|---|---|
| zipfile | file | The zip file to create. | True |
| comment | string | The comment for the file. | False |
| includeemptydirs | bool | Include empty directories in the generated zip file. The default is false. | False |
| stampdatetime | string | An optional date/time stamp for the files. | False |
| ziplevel | int | Desired level of compression. Possible values are 0 (STORE only) to 9 (highest). The default is 6. |
False |
| failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False |
| if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
| unless | bool | Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. |
False |
| verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |
Zip all files in the subdirectory build to backup.zip.
<zip zipfile="backup.zip">
<fileset basedir="build">
<include name="*.*" />
</fileset>
</zip>